#include "msg.h"

#ifndef ___H___CTL_CAR_MESSAGE____
#define ___H___CTL_CAR_MESSAGE____



typedef struct ctl_car_msg_{
        msg_base * msg_;
		int user_id;				//发出指令的用户
		int cmd;					//对设备操作的指令
		int speed;					//小车速度
} ctl_car_msg; 


ctl_car_msg* create_ctl_car_msg(char msgtype,int user_id,int cmd,int speed);

int distory_ctl_car_msg(ctl_car_msg * msg);

int serialize_ctlcar_msg(ctl_car_msg * msg,char** out_msg,int* out_len);

int deserialize_ctlcar_msg(char * msg,int len,ctl_car_msg** out_msg);


#endif
